<div class="progress_chart">
  <span class="goal">
    <%if distance>goal/2 && distance<goal %>
      <span class="labels" style="left: <%= (percent_complete(distance,goal)) + 5 %>px;"><%= distance %> miles to date</span>
    <%elsif distance>=goal%>
      <span class="labels" style="left: 190px;"><%= distance %> miles to date</span>
    <%else%>
      <span class="labels" style="left: <%= (percent_complete(distance,goal) * 4) + 5 %>px;"><%= distance %> miles to date</span>
    <%end%>
    <span class="distance" style="width: <%= percent_complete(distance,goal) * 4 %>px;"></span>
  </span>
  <span class="labels">Goal: <%= goal %> miles</span>
  <div class="percentages"><span class="first">0</span><span>25%</span><span>50%</span><span>75%</span><span>100%</span></div>
</div>
